package com.jackrain.nea.ext.permission;

import lombok.Getter;

/**
 * @author lzm
 * @date 2017-11-20
 */
@Getter
public enum MenuNodeType {
     ROOT(0, "根节点"), SUB_SYSTEM(1, "子系统"), TABLE_CATEGORY(2, "表类别"), MENU(3, "菜单项");

    private int value;
    private String desc;
    MenuNodeType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static MenuNodeType valueOf(Integer value) {
        if(value <ROOT.value || value > MENU.value) {
            return null;
        }
        return values()[value];
    }
}
